<?php

namespace app\api\controller;

use app\common\lib\Param;
use app\common\lib\Show;
use app\common\lib\Str;
use app\Request;
use think\facade\Cache;

class Swiper extends ApiBase
{

    public function index(){
        $limit = input("limit", 0, "intval");
        $swiperBis = new \app\common\business\Banner();

        try {
            $list = $swiperBis->getListByWhereWithLimit([],$limit,'sort desc,id desc','id,url,sort');
        } catch (\Exception $e) {
            return Show::error([], $e->getMessage(), $e->getCode());
        }

        return Show::success($list);
    }
}